package com.example.prom.dangwen.y2023.thread;

public class PrintThread {
    static class A implements Runnable{
        @Override
        public void run() {
            System.out.println("A");
        }
    }

    static class B implements Runnable{
        @Override
        public void run() {
            System.out.println("B");
        }
    }

    static class C implements Runnable{
        @Override
        public void run() {
            System.out.println("C");
        }
    }

    public static void main(String[] args) throws InterruptedException {
        for (int i = 0; i < 10; i++) {
            Thread t1 = new Thread(new A());
            Thread t2 = new Thread(new B());
            Thread t3 = new Thread(new C());

            t1.start();
            t1.join();
            t2.start();
            t2.join();
            t3.start();
            t3.join();
        }
    }
}
